<script setup lang='ts'>
const emit = defineEmits(['change'])
const list = ref([])
onMounted(() => {
  getData()
})
async function getData() {
  const res = await get('/chat/getQuestions')
  list.value = res
}
function handleEmit(text: string) {
  emit('change', text)
}
</script>

<template>
  <div class="">
    <div class="mb-3 mt-30px text-center text-32px text-primary">已为您提供常见问题 点击查看</div>
    <div class="i-ic-baseline-keyboard-double-arrow-down mx-auto mb-7 text-center text-2xl text-primary text-opacity-50" />
    <ul class="leading list-decimal-inside b rounded-30px bg-gray-100 px-10 py-10 text-32px text-gray-700 leading-60px">
      <el-scrollbar height="800px">
        <li v-for="item in list" :key="item" class="cursor-pointer py-2 text-gray-600 hover:text-blue-600" @click="handleEmit(item)"> {{ item }} </li>
      </el-scrollbar>
    </ul>
  </div>
</template>
